//
// Created by mio on 25-5-9.
//

#ifndef TCPCLIENT_H
#define TCPCLIENT_H

#include "define.h"

class TcpClient
{
public:
    TcpClient();
    ~TcpClient();
    void Create();
    bool Connect(std::string ip, uint16_t port);
    void Close();
    void GetMonitorInfo();
protected:
    void Send(uint8_t* data, uint32_t size);
private:
    FILE* file_;
    bool isConnect;
    int sockfd_;
    struct sysinfo info_;
    Monitor_body Monitor_info_;
};

#endif //TCPCLIENT_H